package com.uu.safeguard.service;

import com.uu.safeguard.entity.ChargeLog;

import java.util.LinkedHashMap;
import java.util.List;

/**
 * (ChargeLog)表服务接口
 *
 * @author makejava
 * @since 2021-07-06 14:08:13
 */
public interface ChargeLogService {
    /**
     * @Description: 某运营商某天设备充电记录
     * @Param: [operatorMemberSn, stationSn, startIndex, endIndex, startTime, endTime]
     **/
    List<LinkedHashMap<String,Object>> findStationConsumeDayLog(String operatorMemberSn,String stationSn,int startIndex, int endIndex,Long startTime, Long endTime);
    LinkedHashMap<String,Object> findStationConsumeDayLogCount(String stationSn,String operatorMemberSn, Long startTime, Long endTime);
    /**
     * @Description: 某月设备每天 充电记录
     * @Param: [stationSn, operatorMemberSn, startTime, endTime]
     **/
    List<LinkedHashMap<String,Object>> findStationConsumeList(String stationSn,String operatorMemberSn, Long startTime, Long endTime);
    LinkedHashMap<String,Object> findStationConsumeListTotal(String stationSn,String operatorMemberSn, Long startTime, Long endTime);
    /**
     * @Description: 消费柱状图
     * @Param: [operatorMemberSn, projectSn]
     **/
    LinkedHashMap<String,Object> findConsumeHistogram(String operatorMemberSn,String projectSn);

    /**
     * @Description: 年月日 用户充电记录利润列表
     * @Param: [operatorMemberSn, projectSn, stationSn, memberSn, startIndex, endIndex, startTime, endTime]
     **/
    List<LinkedHashMap<String,Object>> findMemberConsumeListByTime(String operatorMemberSn,String projectSn, String stationSn,String memberSn,int startIndex, int endIndex,Long startTime, Long endTime);
    LinkedHashMap<String,Object> findMemberConsumeListByTimeCount(String operatorMemberSn,String projectSn, String stationSn,String memberSn,Long startTime, Long endTime);

    /**
     * @Description: 用户充电列表
     * @Param: [sn, operatorMemberSn, startIndex, endIndex]
     **/
    List<LinkedHashMap<String,Object>> findMemberChargeList(String sn, String operatorMemberSn, int startIndex, int endIndex);
    Integer findMemberChargeListCount(String sn,String operatorMemberSn);
    /**
     * @Description: 正在充电列表
     * @Param: [memberSn]
     **/
    List<LinkedHashMap<String,Object>> searchMemberChargeList(String memberSn);
    /**
     * @Description: 充电记录
     * @Param: [memberSn]
     **/
    List<LinkedHashMap<String,Object>> searchMemberChargeLog(String memberSn);

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    ChargeLog queryById(Integer id);

    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit 查询条数
     * @return 对象列表
     */
    List<ChargeLog> queryAllByLimit(int offset, int limit);

    /**
     * 新增数据
     *
     * @param chargeLog 实例对象
     * @return 实例对象
     */
    ChargeLog insert(ChargeLog chargeLog);

    /**
     * 修改数据
     *
     * @param chargeLog 实例对象
     * @return 实例对象
     */
    ChargeLog update(ChargeLog chargeLog);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Integer id);

}